import Vue from 'vue'
import Vuex from 'vuex'
import products from './modules/product.js'
import goods from './modules/goods.js'
import user from './modules/user.js'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    name: '',
    cartCount: 1

  },
  mutations: {
    SaveUsername(state, name) {
      state.name = name
    }
  },
  actions: {
    SaveUsername(context, name) {
      context, this.commit("SaveUsername", name)
    }
  },
  modules: {
    user
    // products,
    // goods
  }
})
